Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add on_exists param with behaviour fail, ignore and overwrite #207

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

adamrtalbot
Copy link
Collaborator

@adamrtalbot adamrtalbot commented Feb 26, 2025

This PR adds a feature where you can customize the behaviour when a resource exists. It has three options:

  • fail (default): Fail and halt seqerakit
  • ignore: Keep going and ignore the error
  • overwrite: Use the existing overwrite behaviour

With this, we can repeatedly set up a 'showcase' and it will only create resources where they don't exist and launch pipelines, meaning we can be fairly frugal with resource set up.

The downside is status drift may occur, where the platform resources have diverged from the YAML templates which will not be captured and will be ignored by seqerakit. Not ideal, but a problem even for things like Terraform.

@adamrtalbot adamrtalbot changed the title add on exists param add on_exists param with behaviour fail, ignore and overwrite Feb 26, 2025
@adamrtalbot adamrtalbot linked an issue Feb 26, 2025 that may be closed by this pull request
@adamrtalbot adamrtalbot requested a review from ejseqera February 26, 2025 15:12
@adamrtalbot
Copy link
Collaborator Author

@ejseqera I tried to use an enum to provide some typing but it ended up feeling messier than I would like. It works well now and we can extend it to move behaviours (e.g. remove, update) but I don't like the constant str -> enum -> str behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore resource exists
2 participants